package org.shop.service.impl;

import java.util.List;
import java.util.Map;

import org.shop.dao.FavoritesMapper;
import org.shop.entity.Favorites;
import org.shop.service.FavoritesService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class FavoritesServiceImpl extends BaseServiceImpl<Favorites, Long> implements FavoritesService{

	@Autowired
	private FavoritesMapper favoritesMapper;
	
	@Override
	public Favorites getFavoritesByTargetIdAndFavoriteType(Favorites favorites) {
		return favoritesMapper.getFavoritesByTargetIdAndFavoriteType(favorites);
	}

	public List<Map<String, Object>> getFavoritesList(Map<String, Object> params){
		return favoritesMapper.getFavoritesList(params);
	}

	@Override
	public int delFavoritesByTargetIdAndFavoriteType(Favorites favorites) {
		return favoritesMapper.delFavoritesByTargetIdAndFavoriteType(favorites);
	}
}
